package com.ds.api.utils;

import java.text.SimpleDateFormat;

import org.springframework.stereotype.Component;

import com.fasterxml.jackson.databind.ObjectMapper;
/**
 * 
 * @className: JacksonObjectMapper
 * @description: 用于注入Spring MVC的json转换器
 * @author xiangwei
 */
@Component("jacksonObjectMapper")
public class JacksonObjectMapper extends ObjectMapper {

    private static final long serialVersionUID = 1L;

    public JacksonObjectMapper() {
        // 零时区
        this.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
        // this.setPropertyNamingStrategy(new
        // PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy());
    }

}
